# 基础镜像
FROM openjdk:8u102-jdk

# 作者信息
MAINTAINER "wangyuxi"

ENV TZ Asia/Shanghai

# add group and user
RUN groupadd -r hollicube
RUN useradd -r -m -g hollicube hollicube
RUN usermod -aG hollicube hollicube

ARG HOLLICUBE_HOME=/home/hollicube

ADD target/holli-msa-istio.jar $HOLLICUBE_HOME/holli-msa-istio.jar
ADD shell/startup.sh $HOLLICUBE_HOME/startup.sh

RUN chown -R hollicube:hollicube $HOLLICUBE_HOME/holli-msa-istio.jar
RUN chown -R hollicube:hollicube /usr
RUN chown -R hollicube:hollicube $HOLLICUBE_HOME/startup.sh

USER hollicube
WORKDIR $HOLLICUBE_HOME

# COPY localtime /etc/localtime
EXPOSE 8888/tcp
CMD ["bash","startup.sh"]
